import instance from "@/tools/axios";

// 添加线上客户
const addOnlineCustomers = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/Add", data);
};
// 删除线上客户
const deleteOnlineCustomers = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/Delete", data);
};
// 修改线上客户
const updateOnlineCustomers = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/Update", data);
};
// 分页线上客户
const paginationOnlineCustomers = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/SysOnlineCustomers/Pagination", params);
};
// 我负责的线上客户
const getOnlineCustomers = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/SysOnlineCustomers/GetOnlineCustomers", params);
};
// 查询线上客户的编号
const getOnlineCustomersid = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/SysOnlineCustomers/GetOnlineCustomersid", params);
};

// 移除会员
const pu_date_vip = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/pu_date_vip", data);
};

// 修改到期时间
const pu_sj_vip = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/pu_sj_vip", data);
};

// 修改会员
const Update_vip = async (data: any): Promise<ResponseApiDto> => {
  return instance.post("/SysOnlineCustomers/Update_vip", data);
};

// 查询会员客户
const Get_PaginationAsync = async (params: any): Promise<ResponseApiDto> => {
  return instance.get("/SysOnlineCustomers/Get_Pagination", params);
};

// 上线和下线数量
const Get_counts = async (): Promise<ResponseApiDto> => {
  return instance.get("/SysOnlineCustomers/Get_counts");
};
export {
  addOnlineCustomers,
  paginationOnlineCustomers,
  deleteOnlineCustomers,
  updateOnlineCustomers,
  getOnlineCustomers,
  getOnlineCustomersid,
  pu_date_vip,
  pu_sj_vip,
  Update_vip,
  Get_PaginationAsync,
  Get_counts,
};
